package neu.soft.mapper;


import neu.soft.constant.TaskOrderStatus;
import neu.soft.constant.OrderType;
import neu.soft.constant.TaskOrderType;
import neu.soft.entity.DistributionTaskOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface TaskOrderMapper {


    public DistributionTaskOrder findById(@Param("id")String id);

    public List<DistributionTaskOrder> findByConditions(@Param("pageNow") int pageNow, @Param("pageSize") int pageSize, @Param("date") Date date, @Param("type") TaskOrderType type, @Param("status") TaskOrderStatus status, @Param("date2")Date date2, @Param("id")String id, @Param("isReceipt") int isReceipt);

    public List<DistributionTaskOrder> findAll(@Param("pageNow") int pageNow, @Param("pageSize") int pageSize);

    public String findRandomPostman(@Param("addressId") String addressId);

    public int updateOrders(@Param("list") List<DistributionTaskOrder> list);

    Long getTotalRows(@Param("date") Date date, @Param("type") TaskOrderType type, @Param("status") TaskOrderStatus status, @Param("date2")Date date2, @Param("id")String id, @Param("isReceipt") int isReceipt);

    void storeTaskOrders(@Param("item") Map<String, Object> map);

    int updateOrderStatus(@Param("did") String did);

    int updateTaskById(Map<String, Object> map);

}
